package start.controller;

import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import start.model.BState;
import start.service.IBStateService;

import javax.annotation.Resource;
import java.util.HashMap;
import java.util.List;
import java.util.Map;


@RestController
public class BStateCtrl {
	@Resource
	private IBStateService service;
	@RequestMapping("/bstate/query")
	public List<BState> query(String pcode, String year){
		Map<String,String> map = new HashMap<String,String>();
		map.put("pcode", pcode);
		map.put("year", year);
		return this.service.findAll(map);
		
	}
}
